<!--内容开始-->
<section class="content">
    <div class="search">
        <form class="form-inline" action="{:url('index')}">
            <a class="btn btn-flat btn-primary m_10" href="{:url('index')}">显示全部</a>
            <a class="btn btn-flat btn-success m_10 f_r m_t_5" onclick="javascript :history.back(-1)"><i
                    class="fa fa-undo m-r-10"></i>返 回</a>
        </form>
    </div>
    <!--数据表开始-->
    <div class="row">
        <div class="col-xs-12">
            <div class="box box-body">
                {if $info}
                <form method="post" action="{:url('editPost')}">
                    <input type="hidden" name="id" value="{$info.id}"/>
                    <input type="hidden" name="name" value="{$info.name}"/>
                    {else /}
                    <form method="post" action="{:url('addPost')}">
                        {/if}
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">模型名称</label>
                                <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                    <input type="text" name="title" class="form-control" placeholder="模型名称"
                                           value="{$info.title?$info.title:''}">
                                </div>
                                <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">* 请填写中文名称</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">表名</label>
                                <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                    <input type="text" name="name" class="form-control" placeholder="表名"
                                           value="{$info.name?$info.name:''}" {$info.name?'disabled':''}>
                                </div>
                                <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">* 请填写不带表前缀的英文，如 test</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">列表页字段</label>
                                <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                    <input type="text" name="listfields" class="form-control" placeholder="请输入列表页调用字段"
                                           value="{$info.listfields?$info.listfields:'*'}">
                                </div>
                                <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">* 请输入列表页调用字段，* 表示全部，用英文逗号分割
                                </div>
                            </div>
                        </div>
                        <!---->
                        {if !$info}
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">新建表字段</label>
                                <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                    <div class="dd_radio_lable_left">
                                        <label class="dd_radio_lable">
                                            <input type="radio" name="emptytable" value="1" class="dd_radio"
                                                   checked><span>普通文章表字段</span>
                                        </label>
                                    </div>
                                </div>
                                <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">目前只支持复制普通文章表</div>
                            </div>
                        </div>
                        {/if}
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5">
                                    <label class="text-lable">描述</label>
                                    <textarea class="form-control" name="description" rows="3" placeholder="请输入模型描述">{$info.description?$info.description:''}</textarea>
                                </div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">状态</label>
                                <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                    <div class="dd_radio_lable_left">
                                        {if $info}
                                        <label class="dd_radio_lable">
                                            <input type="radio" name="status" value="1" class="dd_radio" {$info.status ?
                                            'checked' : ''}><span>显示</span>
                                        </label>
                                        <label class="dd_radio_lable">
                                            <input type="radio" name="status" value="0" class="dd_radio" {$info.status ?
                                            '' : 'checked'}><span>隐藏</span>
                                        </label>
                                        {else /}
                                        <label class="dd_radio_lable">
                                            <input type="radio" name="status" value="1" class="dd_radio" checked><span>显示</span>
                                        </label>
                                        <label class="dd_radio_lable">
                                            <input type="radio" name="status" value="0" class="dd_radio"><span>隐藏</span>
                                        </label>
                                        {/if}
                                    </div>
                                </div>
                                <div class="col-xs-1 col-sm-4 col-md-6 col-lg-6 dd_ts">*</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">排序</label>
                                <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                    <input type="text" name="sort" class="form-control" placeholder="请输入排序"
                                           value="{$info.sort ? $info.sort : '50'}">
                                </div>
                                <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts"> * 排序为从小到大排序，默认为50</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5 text-center">
                                    <button type="submit" class="btn btn-flat btn-primary ">提 交</button>
                                    <button type="button" class="btn btn-flat btn-default"
                                            onclick="javascript :history.back(-1)">返 回
                                    </button>
                                </div>

                            </div>
                        </div>
                    </form>
            </div>
            <!-- /.box -->
        </div>
    </div>
    <!--数据表结束-->
</section>
<!--内容结束-->
